package com.sugar.follow.up.module.business.controller.admin.patient.fszl.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.sugar.follow.up.module.business.framework.web.convert.ListToStringConverter;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import cn.idev.excel.annotation.*;

import static com.sugar.follow.up.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 放射治疗 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PatientFszlRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17336")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "就诊人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19530")
    @ExcelProperty("就诊人ID")
    private Long patientId;

    @Schema(description = "就诊人姓名（冗余）", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("就诊人姓名")
    private String patientName;

    @Schema(description = "录入医生ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17701")
    @ExcelProperty("录入医生ID")
    private Long doctorId;

    @Schema(description = "录入医生姓名（冗余）", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @ExcelProperty("录入医生姓名")
    private String doctorName;

    @Schema(description = "放疗目的（多选：根治性；辅助性）")
    @ExcelProperty(value = "放疗目的", converter = ListToStringConverter.class)
    private List<String> flmd;

    @Schema(description = "开始日期")
    @ExcelProperty("开始日期")
    @JsonSerialize(using = LocalDateSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate startDate;

    @Schema(description = "结束日期")
    @ExcelProperty("结束日期")
    @JsonSerialize(using = LocalDateSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate endDate;

    @Schema(description = "总剂量")
    @ExcelProperty("总剂量")
    private String zjl;

    @Schema(description = "放疗概况")
    @ExcelProperty("放疗概况")
    private String flgk;

    @Schema(description = "靶区（多选：盆腔淋巴结；前列腺；睾丸；其它）")
    @ExcelProperty(value = "靶区", converter = ListToStringConverter.class)
    private List<String> bq;

    @Schema(description = "直肠损伤（直肠炎）-分级")
    @ExcelProperty("直肠损伤（直肠炎）-分级")
    private String bfzZcssFj;

    @Schema(description = "直肠损伤（直肠炎）-结果")
    @ExcelProperty("直肠损伤（直肠炎）-结果")
    private String bfzZcssCl;

    @Schema(description = "直肠损伤（直肠炎）-处理")
    @ExcelProperty("直肠损伤（直肠炎）-处理")
    private String bfzZcssJg;

    @Schema(description = "膀胱炎（血尿）-分级")
    @ExcelProperty("膀胱炎（血尿）-分级")
    private String bfzPgyFj;

    @Schema(description = "膀胱炎（血尿）-处理")
    @ExcelProperty("膀胱炎（血尿）-处理")
    private String bfzPgyCl;

    @Schema(description = "膀胱炎（血尿）-结果")
    @ExcelProperty("膀胱炎（血尿）-结果")
    private String bfzPgyJg;

    @Schema(description = "尿失禁-分级")
    @ExcelProperty("尿失禁-分级")
    private String bfzNsjFj;

    @Schema(description = "尿失禁-处理")
    @ExcelProperty("尿失禁-处理")
    private String bfzNsjCl;

    @Schema(description = "尿失禁-结果")
    @ExcelProperty("尿失禁-结果")
    private String bfzNsjJg;

    @Schema(description = "勃起障碍-分级")
    @ExcelProperty("勃起障碍-分级")
    private String bfzBqzaFj;

    @Schema(description = "勃起障碍-处理")
    @ExcelProperty("勃起障碍-处理")
    private String bfzBqzaCl;

    @Schema(description = "勃起障碍-结果")
    @ExcelProperty("勃起障碍-结果")
    private String bfzBqzaJg;

    @Schema(description = "其它-分级")
    @ExcelProperty("其它-分级")
    private String bfzOtherFj;

    @Schema(description = "其它-处理")
    @ExcelProperty("其它-处理")
    private String bfzOtherCl;

    @Schema(description = "其它-结果")
    @ExcelProperty("其它-结果")
    private String bfzOtherJg;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
